#include <tinx/device.h>
#include <tinx/vsprintf.h>

static char buf[1024];

int printk(char *fmt, ...)
{
    va_list args;
    va_start(args, fmt);

    int i = vsprintf(buf, fmt, args);

    va_end(args);

    dev_t dev = device_find(DEV_FLAG_CONSOLE, 1);

    return device_write(dev, buf, i, 0, 0);
}